<?php

namespace App\Models\Enum;

/**
 * 状态
 */
class Status
{
    const NORMAL = 1;
    const BAN = 2;

    public static function get($type)
    {
        switch ($type) {
            case self::NORMAL:
                return '正常';
            case self::BAN:
                return '禁止';
            default:
                return '类型未定义';
        }
    }

    public static function getAll()
    {
        return [
            self::NORMAL => self::get(self::NORMAL),
            self::BAN => self::get(self::BAN),
        ];
    }
}